<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>直营店添加商品</title>
        <link rel="stylesheet" href="css/reset.css" />
        <link rel="stylesheet" href="css/platform.css" />
        <link rel="stylesheet" href="js/ui/jquery-ui.min.css" />
        <link rel="stylesheet" href="css/table.css" />
        <link rel="stylesheet" href="css/data-mssComm.css" />
    </head>

    <body>
         <div class="header">
            <div class="u-title">添加商品</div>
        </div>
        <div class="main" ms-controller="mainController">
            <div class="u-multiform">
                <div class="column">
                    <div class="cell">
                        <label>商品搜索：</label>
                        <div class="cnt-box">
                            <input class="u-ipt"  placeholder="请输入商品编码" maxlength="18" ms-duplex="searchCommCode" />
                        </div>
                    </div>
                </div>
                <div class="column">
                    <label></label>
                    <button class="u-btn small search" ms-click="searchComm">查询</button>
                </div>
            </div>
            <div class="u-title-tip"><span>查询结果</span>
            </div>
            
	        <div class="tableWrapper">
	            <table class="table">
	                <thead>
	                    <tr>
	                        <th colspan="2">商品信息</th>
	                        <th>商品编码</th>
	                        <th>价格</th>
	                        <th>品类</th>
	                        <th>类型</th>
	                    </tr>
	                </thead>
	                <tbody id="commBody">
	                    <tr>
	                        <td class="table-row-pic"><img ms-attr-src="pic"/></td>
	                        <td class="table-row-name">{{processName(partName)}}</td>
	                        <td>{{commCode}}</td>
	                        <td>{{price}}</td>
	                        <td>
	                            <select ms-duplex="cateCode">
                                    <option ms-repeat-cate="allCategory" ms-attr-value="cate.cateCode">{{cate.cateName}}</option>
                                </select>
	                        </td>
	                        <td>
	                            <select ms-duplex="typeId">
	                                <option value="20">优选</option>
	                                <option value="10">畅销</option>
	                            </select>
	                        </td>
	                    </tr>
	                </tbody>
	                <tfoot>
	                    <tr>
	                        <td colspan="6">
	                           <div class="u-multiform" style="text-align:right;margin-top:10px;padding-top:15px;border-top:1px solid #CCC;">
		                            <div class="column">
			                            <div class="cell">
			                                <label>有效日期：</label>
			                                <div class="cnt-box">
			                                    <input class="u-ipt ipt-timepicker" type="text" readonly="readonly" id="beginDate" placeholder="开始时间" ms-duplex="beginDate" />
			                                    <span class="split">-</span>
			                                    <input class="u-ipt ipt-timepicker" type="text" readonly="readonly" id="endDate" placeholder="结束时间" ms-duplex="endDate" />
			                                </div>
			                            </div>
	                                </div>
		                            <div class="column" style="padding-top:10px;border-top:1px solid #CCC;">
		                              <div class="cell">
		                                  <div class="cnt-box">
			                                <button class="u-btn small" ms-click="addComm">添加</button><span class="split">&nbsp;&nbsp;</span>
			                                <button class="u-btn small gray" ms-click="back">返回</button>
	                                       </div>
	                                   </div>
	                                </div>
	                            </div>
	                        </td>
	                    </tr>
	                </tfoot>
	            </table>
	        </div>
        </div>
        
        <!--弹框区域-->
        <div ms-controller="popController">
            <div class="u-popup" id="popup_confirm">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell alert">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">提示</p>
                            <div class="container">
                                <div class="warning"></div>
                                <p>确定要删除该商品吗？</p>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn" ms-click="confirmSure()">确定</button>
                                <button class="u-btn gray btn-close">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="u-popup" id="popup_tips">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell alert">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">提示</p>
                            <div class="container">
                                <div class="error"></div>
                                <p></p>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn btn-close">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="loadData"></div>
        <script src="js/jquery.min.js"></script>
        <script src="js/avalon.shim.sn.js"></script>
        <script src="js/platform.js"></script>
        <script src="js/DataInterface/DataInterface.js"></script>
        <script src="js/ui/jquery-ui.min.js"></script>
        <script src="js/ui/jquery-ui-timepicker-addon.js"></script>
        <script src="js/mss-addcomm.js"></script>
    </body>
</html>
